--Same as Ted Kaehler's script, except it's specific for this button
on mouseStillDown
--Edits the script of a button if you press and hold the
--mouse button inside the button, and quickly
--move in and out of the top edge of the button twice.
global editTicks, editState
if (the ticks)-editTicks > 120 then
put the ticks into editTicks
put 0 into editState
else
get the rect of me
if the mouseV < (item 2 of it) then
if editState = 0 then put 1 into editState
if editState = 2 then put 3 into editState
end if
if the mouseV > (item 2 of it) then
if editState = 1 then put 2 into editState
if editState = 3 then put 4 into editState
end if
end if
--put editState
if editState = 4 then edit script of the name of me
end mouseStillDown
-- part contents for background part 11
----- text -----
• Use a gesture to get to a button's script, without having to choose the Button Tool. The gesture consists of pressing and holding the mouse button down inside the button, and moving the cursor in and out of the top edge of the button 2 times! (Rub the top edge of the button.)
Practice until you can do it.
(The trick here is to not interfere with anything else. I don't use the idle task, it can slow things down. The whole thing is in the mouseStillDown message. If your button uses mouseStillDown, you might want to "pass mouseStillDown" at the end of your script.)
Put this into your Home stack script
on mouseStillDown
--Edits the script of a button if you press and hold the
--mouse button inside the button, and quickly
--move in and out of the top edge of the button twice.
if "button" is not in the name of the target then exit mouseStillDown
global editTicks, editState
if (the ticks)-editTicks > 120 then
put the ticks into editTicks
put 0 into editState
else
get the rect of the target
if the mouseV < (item 2 of it) then
if editState = 0 then put 1 into editState
if editState = 2 then put 3 into editState
end if
if the mouseV > (item 2 of it) then
if editState = 1 then put 2 into editState
if editState = 3 then put 4 into editState
end if
end if
--put editState
if editState = 4 then edit script of the name of the target